import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class AppBtn extends StatelessWidget {
  const AppBtn({
    super.key,
    this.backcolor,
    this.borderRadius = 10,
    this.height = 40,
    required this.onTap,
    required this.child,
    this.border,
  });

  final Function() onTap;
  final Color? backcolor;
  final double borderRadius;
  final BoxBorder? border;
  final double height;
  final Widget child;

  @override
  Widget build(BuildContext context) {
    return InkWell(
      child: Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(5),
          color: Colors.white,
          border: border,
        ),
        alignment: Alignment.center,
        height: 40,
        child: child,
      ),
      onTap: onTap,
    );
  }
}
